<!--  -->
<template>
  <a-card
    style="width: 100%"
    :tab-list="tabListNoTitle"
    :active-tab-key="titleKey"
    @tabChange="key => onTabChange(key)"
    :bordered="false"
    class="br-10"
  >
    <div v-if="titleKey === 'global'">
      <GlobalSet />
    </div>
    <div v-else-if="titleKey === 'miniProgram'">
      <MiniProgram />
    </div>
    <div v-else-if="titleKey === 'link'">
      <SystemLink />
    </div>
  </a-card>
</template>

<script>
import GlobalSet from './components/global'
import MiniProgram from './components/miniProgram'
import SystemLink from './components/systemLink'

export default {
  components: {
    GlobalSet,
    MiniProgram,
    SystemLink
  },
  data() {
    return {
      tabListNoTitle: [
        {
          key: 'miniProgram',
          tab: '小程序'
        },
        {
          key: 'global',
          tab: '全局配置'
        },
        {
          key: 'link',
          tab: '公共链接'
        }
      ],
      titleKey: 'miniProgram'
    }
  },
  computed: {},
  watch: {},
  methods: {
    onTabChange(key) {
      this.titleKey = key
    }
  },
  created() {},
  mounted() {}
}
</script>
<style scoped></style>
